package com.sinopec.basemodule.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 类描述：key和value的bean类 <br/>
 */
public class KeyValueBean implements Parcelable {
    public KeyValueBean(int id, String value) {
        this.id = id;
        this.value = value;
    }

    private int id;
    private String value;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    ///////////////////////////////////////////////////

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.value);
    }

    public KeyValueBean() {
    }

    protected KeyValueBean(Parcel in) {
        this.id = in.readInt();
        this.value = in.readString();
    }

    public static final Parcelable.Creator<KeyValueBean> CREATOR = new Parcelable.Creator<KeyValueBean>() {
        @Override
        public KeyValueBean createFromParcel(Parcel source) {
            return new KeyValueBean(source);
        }

        @Override
        public KeyValueBean[] newArray(int size) {
            return new KeyValueBean[size];
        }
    };
}
